﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BankBillsLedger.aspx.cs"
    Inherits="Thksoft.Module.BillManagement.BankBillsLedger" %>

<!DOCTYPE html>
<html class="L_UI">
<head id="Head1" runat="server">
    <title>银行票据台账</title>
    <link href="/CSS/Main.css" rel="stylesheet" type="text/css" />
    <link href="/UserCotrols/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
    <script src="/UserCotrols/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script type="text/javascript">

        var option = {};
        option.Area = ["1020px", "730px"];

        option.CancelCallback = function (index, layero) {
            //刷新页面
            //location.href = location.href;
            $("#btnSelect").click();
        };

        function FORM_EDIT(id, type) {
            var sel = true;
            option.Url = "../Modal/BankBillsLedgerEdit.aspx?ID=" + id + "&Type=" + type + "&Select=" + sel;
            option.Title = "银行票据台账详情";
            top.MessageBox.Load(option);
        }

        //        function show(id, type) {
        //            var option = {};
        //            option.Area = ['900px', '550px'];
        //            option.Title = '银行票据台账明细';

        //            option.Scrollbar = false;
        //            option.shadeClose = true;
        //            option.maxmin = true;
        //            option.Url = '/Module/BillManagement/BankBillsLedger.htm?ID=' + id + "&Type=" + type;

        //            top.MessageBox.Load(option);
        //        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="Window" style="min-width: 1100px;">
            <div class="Header" style="height: 79px;">
                <table border="0" cellpadding="0" cellspacing="0" width="100%" class="table">
                    <tr>
                        <td style="width: 7%; text-align: right; padding-right: 5px;">出票公司：
                        </td>
                        <td style="width: 20%; text-align: left; padding-left: 10px;">
                            <uc2:CtrlCompany runat="server" ID="FORM_COMPANY_ID" Width="170px" />
                        </td>
                        <td style="width: 7%; text-align: right; padding-right: 5px;">支付银行：
                        </td>
                        <td style="width: 20%; text-align: left; padding-left: 10px;">
                            <asp:DropDownList ID="FORM_BANK_ID" runat="server" Width="170px">
                            </asp:DropDownList>
                        </td>
                        <td style="width: 7%; text-align: right; padding-right: 5px;">出票日期：
                        </td>
                        <td style="width: 20%; text-align: left; padding-left: 10px;">
                            <input id="FORM_BEGIN_DATE" runat="server" class="Wdate" style="width: 85px;" type="text"
                                onclick="WdatePicker()" />
                            至
                        <input id="FORM_OVER_DATE" runat="server" class="Wdate" style="width: 85px;" type="text"
                            onclick="WdatePicker()" />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 7%; text-align: right; padding-right: 5px;">出票账户：
                        </td>
                        <td style="width: 15%; text-align: left; padding-left: 10px;">
                            <input id="txtDRAWERACCOUNT" runat="server" value="" class="lblName" style="width: 168px;" />
                        </td>
                        <td style="width: 7%; text-align: right; padding-right: 5px;">票据类型：
                        </td>
                        <td style="width: 20%; text-align: left; padding-left: 10px;" colspan="3">
                            <asp:DropDownList ID="FORM_Type" runat="server" Width="170px">
                                <asp:ListItem Value="-1">---请选择---</asp:ListItem>
                                <asp:ListItem Value="1">商业汇票</asp:ListItem>
                                <asp:ListItem Value="2">银行本票</asp:ListItem>
                                <asp:ListItem Value="3">转账支票</asp:ListItem>
                                <asp:ListItem Value="4">现金支票</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="6">
                            <asp:Button ID="btnSelect" runat="server" Text="查询" CssClass="bt_css_s" OnClick="btnSelect_Click" />&nbsp;
                        <%--<asp:Button ID="btnEdit" runat="server" Text="编辑" CssClass="bt_css_s" OnClick="btnEdit_Click"
                            OnClientClick="return ValidateEdit();" />&nbsp;--%>
                            <asp:Button ID="btnDaoChu" runat="server" Text="导出" CssClass="bt_css_s" OnClick="btnDaoChu_Click" />&nbsp;
                        <asp:Button ID="btnPrint" runat="server" Text="打印" CssClass="bt_css_s" OnClick="PRINT_CLICK" />
                        </td>
                    </tr>
                </table>
            </div>
            <div class="Content" style="top: 102px;">
                <div class="Pg-Content">
                    <asp:ScriptManager ID="ScriptManagers" runat="server" EnablePageMethods="True" EnableScriptGlobalization="True"
                        EnableScriptLocalization="True">
                    </asp:ScriptManager>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:GridView ID="grvShow1" runat="server" AutoGenerateColumns="False" CssClass="cont_list zebra"
                                Width="100%" EmptyDataText="没有查找到您要的数据" AllowSorting="True" OnSorting="grvShow1_Sorting">
                                <Columns>
                                    <asp:BoundField DataField="R" HeaderText="序号" ItemStyle-Width="5%" SortExpression="T2.N_ID" />
                                    <%--<asp:TemplateField ItemStyle-Width="5%">
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="chkSelectAll" runat="server" Onclick="GetAllCheckBox(this)" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkSelectId" runat="server" ToolTip='<%#Eval("N_ID")%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>--%>
                                    <asp:BoundField DataField="TYPENAME" HeaderText="票据种类" SortExpression="TYPE" ItemStyle-Width="7%" />
                                    <asp:BoundField DataField="CMY_NAME" HeaderText="出票人公司名称" SortExpression="CMY_NAME"
                                        ItemStyle-Width="10%" />
                                    <asp:BoundField DataField="C_NAME" HeaderText="出票人银行名称" SortExpression="C_NAME" ItemStyle-Width="10%" />
                                    <asp:BoundField DataField="ACCOUNT" HeaderText="出票人账户" SortExpression="ACCOUNT" ItemStyle-Width="10%" />
                                    <asp:BoundField DataField="PAY_AMOUNT" HeaderText="出票金额" SortExpression="PAY_AMOUNT"
                                        ItemStyle-Width="5%" />
                                    <asp:BoundField DataField="START_DATE" HeaderText="出票日期" SortExpression="START_DATE"
                                        ItemStyle-Width="10%" />
                                    <asp:BoundField DataField="DE_CODE" HeaderText="票据编号" SortExpression="DE_CODE" ItemStyle-Width="7%" />
                                    <asp:BoundField DataField="REMARK" HeaderText="备注" ItemStyle-CssClass="left" ItemStyle-Width="10%" />
                                    <asp:TemplateField HeaderText="查看详细" ItemStyle-Width="4%">
                                        <ItemTemplate>
                                            <%--<input type="image" src="../../Images/folder.png" style="width: 20px; height: 15px;"
                                            onclick='show(<%#Eval("ID") %>,<%#Eval("TYPE") %>);' title="查看详细" />--%>
                                            <input <%#Eval("N_ID")==DBNull.Value?"class='hide'":"" %> type="image" src="../../Images/XiangXi.png"
                                                style="width: 16px; height: 16px;" onclick='FORM_EDIT(<%#Eval("ID") %>,<%#Eval("TYPE") %>);'
                                                title="查看详细" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
                <div class="Pg">
                    <uc1:Pagination ID="PageIng" runat="server" OnDataBinding="PageIng_DataBinding" Visible="false" />
                </div>
            </div>
            <div class="Content" style="top: 112px; display: none;">
                <asp:HiddenField runat="server" ID="FORM_PRINT_VALUE" />
                <table runat="server" id="tablemain" width='2035' border='0' cellpadding='0' cellspacing='0'
                    style='width: 1526.25pt; border-collapse: collapse; table-layout: fixed; text-align: center;'>
                    <tbody>
                        <tr style='height: 40px; mso-height-source: userset; mso-height-alt: 600;'>
                            <th align="center" class='xl70' height='40' width='1945' colspan='17' style='height: 30.00pt; width: 1458.75pt; border-right: none; border-bottom: none;'
                                x:str=''>银行票据台账
                            </th>
                            <td class='xl67' width='90' style='width: 67.50pt;'></td>
                        </tr>
                        <tr height='40' style='height: 30.00pt; mso-height-source: userset; mso-height-alt: 600;'>
                            <td class='xl67' height='40' colspan='2' style='height: 30.00pt; mso-ignore: colspan;'></td>
                            <td class='xl71' colspan='3' style='border-right: none; border-bottom: none;'></td>
                            <td class='xl72'></td>
                            <td class='xl73'></td>
                            <td class='xl72' colspan='5' style='mso-ignore: colspan;'></td>
                            <td class='xl80'></td>
                            <td class='xl71' colspan='5' style='border-right: none; border-bottom: none;'></td>
                        </tr>
                        <tr height='40' class='xl65' style='height: 30.00pt; mso-height-source: userset; mso-height-alt: 600;'>
                            <td class='xl65' height='40' style='height: 30.00pt;'></td>
                            <td class='xl74' colspan='15' style='border-right: none; border-bottom: .5pt solid windowtext;'
                                x:str=''>开户行：<label id="lblC_NAME" runat="server"></label><span style='mso-spacerun: yes;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                </span>账号：<label id="lblACCOUNT" runat="server"></label><span style='mso-spacerun: yes;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                            </td>
                            <td class='xl65'></td>
                        </tr>
                        <tr height='40' class='xl66' style='height: 30.00pt; mso-height-source: userset; mso-height-alt: 600;'>
                            <td class='xl75' height='120' rowspan='3' style='width: 16px; height: 90.00pt; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>序号
                            </td>
                            <td class='xl75' rowspan='3' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>票据种类
                            </td>
                            <td class='xl75' colspan='3' style='border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>购入情况
                            </td>
                            <td class='xl75' colspan='12' style='border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>使用情况
                            </td>
                            <td class='xl75' rowspan='3' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>承兑时间
                            </td>
                        </tr>
                        <tr height='40' class='xl66' style='height: 30.00pt; mso-height-source: userset; mso-height-alt: 600;'>
                            <td class='xl75' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>日<span style='mso-spacerun: yes;'>&nbsp; </span>期
                            </td>
                            <td class='xl75' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>票据号码
                            </td>
                            <td class='xl75' rowspan='2' style='width: 15px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>份数
                            </td>
                            <td class='xl75' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>出票日期
                            </td>
                            <td class='xl76' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>票据期限（月）
                            </td>
                            <td class='xl75' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>到期日
                            </td>
                            <td class='xl75' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>票据号码
                            </td>
                            <td class='xl75' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>收款单位
                            </td>
                            <td class='xl75' colspan='2' style='border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>用<span style='mso-spacerun: yes;'>&nbsp; </span>途
                            </td>
                            <td class='xl81' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>金额(元）
                            </td>
                            <td class='xl82' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>经办人
                            </td>
                            <td class='xl82' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>收票时间
                            </td>
                            <td class='xl82' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>收票人签字
                            </td>
                            <td class='xl75' rowspan='2' style='width: 100px; border-right: .5pt solid windowtext; border-bottom: .5pt solid windowtext;'
                                x:str=''>收票人联系电话
                            </td>
                        </tr>
                        <tr height='40' class='xl66' style='height: 30.00pt; mso-height-source: userset; mso-height-alt: 600;'>
                            <td class='xl75' style='width: 100px;'>项目名称
                            </td>
                            <td class='xl75' style='width: 100px;'>合同编号
                            </td>
                        </tr>
                        <tr height='40' runat="server" id="tdbill" style='height: 30.00pt; mso-height-source: userset; mso-height-alt: 600;'>
                            <td colspan="20">
                                <div runat="server" id="Div1">
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <script src="../../Scripts/jquery-1.7.min.js" type="text/javascript"></script>
        <script>
        $(function () {
            $("#<%=this.FORM_PRINT_VALUE.ClientID %>").val($("#tablemain").html());
        });
        </script>
    </form>
</body>
</html>